/* eslint-disable */
export const isDev = true; // true => 测试环境 | false => 正式环境,设置为true时，注意app.js中getCurrentEnv方法的经纬度设置
const baseUrl = isDev ? "https://testermapi.xlgxapp.com/" : "https://ermapi.xlgxapp.com/";
export const apiMethod = 'api/v1/'; // api接口
export const apiMethodV2 = "api/v2/" //apiV2接口
export const apiMethodV3 = "api/v3/" //apiV2接口
export const version = "v2/" //接口版本号
export const rideMod = "bike/" //骑行模块
export const userMod = "user/" //用户模块
export const vehicleMod = "vehicle/" //车辆模块
export const defaultAreaId = isDev ? "315001" : "315000" //默认区域areaId
export const wxURL = !isDev ? "https://weixinapi.xlgxapp.com/" : "https://testweixinapi.xlgxapp.com/" //微信调用接口
export const bigdataUrl = 'https://bigdata.xlgxapp.com/'
/**
 * 获取gwsignKey的接口
 *https://testgw.xlgxapp.com/apollo/OrHL2DTW/createAppkey?appVersion=2.37.26
 */
export const config = {
    baseUrl: `${baseUrl}`,
    IMGURL: `${baseUrl}`,
    testToken: "eyJhbGciOiJIUzI1NiJ9.eyJwIjoiMDZDMTZGRTkwREE0M0Q0Mjc4RTYxQjE3QkYzMEYxN0QiLCJ0IjoxNjA1NzUzMjkxMjM5LCJwaG9uZSI6IjEzMDU2OTkxODcwIiwidSI6IkJDMjVCQkNGMUZGMDczN0Y1MURBRUE1NTc0NUFDRjFFIiwiZiI6MzE1MDAxLCJ2IjoyLCJmaWxsbmFtZSI6IuW8oOWBpSIsImlkIjoxMjcxfQ.GSHwQU9uBB_lkfdOIBVMB69n4MIdWCYucwk6xHTQNWw",
    baseURL: isDev ? "https://testermapi.xlgxapp.com/" : "https://ermapi.xlgxapp.com/",
    TMapKey: "AVYBZ-3HSKP-M5DDY-LBWAZ-WSUGF-XCBL2",
    ruleURL: isDev ? "https://test6-h5.xlgxapp.com/apph5_v2/#/rule?areaId=" : "https://h5n.xlgxapp.com/apph5_v2/#/rule?areaId=",
    msgURL: isDev ? "https://test6-h5.xlgxapp.com/apph5_v2/#/msg" : "https://h5n.xlgxapp.com/apph5_v2/#/msg",
    wxpayURL: isDev ? "https://test6-h5.xlgxapp.com/apph5_v2/#/depositFree" : "https://h5n.xlgxapp.com/apph5_v2/#/depositFree",
    bluetoothURL: isDev ? "https://test6-h5.xlgxapp.com/apph5_v2/#/bluetooth" : "https://h5n.xlgxapp.com/apph5_v2/#/bluetooth",
    buyCardURL: isDev ? "https://test6-h5.xlgxapp.com/apph5_v2/#/buyCard" : "https://h5n.xlgxapp.com/apph5_v2/#/buyCard",
    webWechat: "https://im.7x24cc.com/phone_webChat.html?accountId=N000000014228&chatId=f2340292-5c77-4d7d-a288-e1aa0d65bd76",
    ossImgURL: "https://xiaoliuimgs.oss-cn-hangzhou.aliyuncs.com/app_imgs/",
    sdkVersion: '0.0.1',
    appVersion: '2.44.0',
    latLng: {
        lat: 29.8088169,
        lng: 121.55633544
    },
    MobileReg: /^13[0-9]{9}|14[10,40][0-9]{7}|14[5-9][0-9]{8}|15[0-3,5-9][0-9]{8}|17[0-3,5-8][0-9]{8}|18[0-9]{9}|19[1,8,9][0-9]{8}|16[5,6,9][0-9]{8}$/,
    decimalReg: /^(([^0][0-9]+|0)\.([0-9]{1,2}))$/,
    idCardReg: /^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/,
    gwsignKey: 'liubike666'
}

export function getMethod(type) {
    if (type.toUpperCase() == 'GET' || type.toUpperCase() == 'DELETE') {
        return 'params'
    } else {
        return 'data'
    }
}
